package com.example.JcGQS.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.JcGQS.pojo.entity.Goods;
import com.example.JcGQS.pojo.vo.GoodsAttributeVo;
import com.example.JcGQS.pojo.vo.GoodsListVo;
import com.example.JcGQS.pojo.vo.GoodsVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @ClassName GoodsMapper
 * @Description 物品表 Mapper 接口
 *
 * @author 末日
 * @date 2023/11/21
 */
@Repository
public interface GoodsMapper extends BaseMapper<Goods> {

    /**
     * 物料列表
     * @return
     */
//    @Select("SELECT g.goods_id, g.goods_number, gc.category_name, g.goods_name, g.goods_specification, g.goods_model, g.goods_unit, g.goods_create_time, g.goods_update_time\n" +
//            "        FROM goods g\n" +
//            "                LEFT JOIN goods_category gc\n" +
//            "                      ON g.category_id = gc.category_id\n" +
//            "        ORDER BY g.goods_id")
    List<GoodsListVo> goodsList();


    /**
     * 根据编号查询物料
     */
    GoodsListVo selectNumber(@Param("number") String number);
    /**
 * 搜索物料
 */
void searchGoods(@Param("value") String value);

    /**
     * @Title listGoodsAttribute
     * @Description 物品属性查询
     * 
     * @param columnCode
     *            字段代号
     * @param goodsAttributeVo
     *            物品请求参数
     * @return List<GoodsVo>
     */
    List<GoodsVo> listGoodsAttribute(String columnCode,@Param("goodsAttributeVo") GoodsAttributeVo goodsAttributeVo);

    GoodsListVo selectByIdGoodVo(@Param("id") Integer id);
}
